/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package simhya.modelchecking.mtl;

/**
 *
 * @author Luca
 */
public class MTLnot  extends MTLnode {
    
     public MTLnot(MTLnode child) {
        super();
        super.setChild(child);
        child.setParent(this);
    }
    
     @Override
      public String toFormulaTree(int depth) {
        String s = "";
        for (int i=0;i<depth;i++)
            s += "   ";
        s += "NOT\n";
        return s + super.toFormulaTree(depth);
    }

    @Override
    ParametricInterval setExplorableTopNodes(String parameter) {
        if (this.isTopNode) {
            return child.setExplorableTopNodes(parameter);
        } else return null;
    }
     
     @Override
    void labelingFormulaPointwiseSemantics(double[] deltaTimes) {
        for (int i=0;i<this.traceLength;i++)
            this.truthValue[i] = !child.truthValue[i];
    }

    @Override
    void labelingTopFormulaPointwiseSemantics(double[] deltaTimes, boolean varyInterval, boolean varyRightBound, int points) {   
        for (int i=0;i<child.truthValue.length;i++)
            this.truthValue[i] = !child.truthValue[i];
    } 

    
}
